<?php
$folder=addslashes($_GET['s']);
$dir='../../files';
if (!is_dir("$dir/$folder")) {
	die ("Wrong Url!");
}
$sdir="$dir/$folder";
$handle=opendir($sdir);
while ($t=readdir($handle)) {
	if (($t!='.')&&($t!='..')) {
		$fname=$t;
	}
}
if (!isset($fname)) {
	die ("No subtitle found!");
}

header('Content-type: application/octet-stream');
header('Content-Disposition: attachment; filename="'.addslashes($fname).'"');
readfile("$sdir/$fname");
?>